<div class="vista_toolbar">
	<ul>
		<%= toolbar_add 'osoite', 'addresses', customer %>
		<%= toolbar_delete_selected 'addresses' %>
	</ul>
</div>
<%form_remote_tag :url => destroy_selected_addresses_url, :confirm => 'Haluatko varmasti poistaa osoitteet?', :before => "spinnerOn('addresses');", :complete => "spinnerOff('addresses');", :method => :delete, :html => {:id => 'addresses_form'} do %><%if customer.addresses.empty? %>
<div class="container">
    Osoite puuttuu.
</div>
<%else %>
<div class="scrollable" style="height:14em">
    <%customer.addresses.each do |address| %>
    <div class="container">
        <div style="float:right">
            <%=icon_edit('addresses', address, customer)%>
			<%=link_to_remote(image_tag('printer.png', :border => 0), :url => print_address_url(address), :method => :get) %>
			<%=checkbox_delete_selected('addresses', address.id)%>
        </div>
        <%=h address.street1 %><%if !address.street2.nil? && !address.street2.empty? %>
        <br/>
        <%=h address.street2 %><%end %>
        <br/>
        <%=h address.postal %>
        <%if !address.city.nil? %>
          <%=h address.city.upcase %>
        <%end%>
        <div style="clear:both">
        </div>
    </div>
    <%end %>
</div>
<%end %>
<%end %>